package com.bsit.obu.base;

import android.app.Application;
import android.serialport.DeviceControlSpd;

import com.bsit.obu.constant.Constants;
import com.bsit.obu.utils.LogcatHelper;
import com.tencent.bugly.Bugly;
import com.tencent.bugly.crashreport.CrashReport;
import com.tianyuxinghang.sxmobileterm.model.MTSdkImp;
import com.tianyuxinghang.sxmobileterm.model.SxMobileterCallBack;

import java.io.IOException;


/**
 * Created by DELL on 2016/5/19.
 */
public class BaseApplication extends Application {

    private static BaseApplication mApplication;


    @Override
    public void onCreate() {
        super.onCreate();
        mApplication = this;
        Bugly.init(getApplicationContext(), "f09bcec8eb", false);
        CrashReport.initCrashReport(getApplicationContext(), "f09bcec8eb", true);
        LogcatHelper.getInstance(this).start();
        MTSdkImp.getInstance(this).initSDK("/dev/ttyMT1", 115200, new SxMobileterCallBack() {
            @Override
            public void onSuccess() {

            }

            @Override
            public void onFail() {

            }
        });
    }


    public static  BaseApplication getInstance() {
        return mApplication;
    }


}
